package org.yaukie.core.api;

import org.quartz.SchedulerException;


/**
 * @Author: yuenbin
 * @Date :2020/5/16
 * @Time :9:51
 * @Motto: It is better to be clear than to be clever !
 * @Destrib:
 **/
public interface MyJobInter {


    /**
     * 根据时间规则，启动一个作业
     *
     * @param jobClass
     * @param cron
     * @throws SchedulerException
     */
    void startJob(Class jobClass, String cron);

    void startJob(Class jobClass, int seconds);

    void startJob(Class jobClass, int count, int seconds);


    void startJob(Class jobClass, int count, int seconds, String start, String end);


    /**
     * 关闭一个作业
     *
     * @param jobClass
     */
    void stopJob(Class jobClass);

    /**
     * 启动所有含有Job注解的所有定时任务
     * 注意,需要指定要扫描的基础包路径
     */
    void startAllJob();


    /**
     * 关闭所有job
     */
    void stopAllJob();


    /**
     * 暂定一个job
     *
     * @param jobClass
     * @throws SchedulerException
     */
    void pauseJob(Class jobClass) throws SchedulerException;

    /**
     * 启动一个job
     *
     * @param jobClass
     * @throws SchedulerException
     */
    void resumeJob(Class jobClass) throws SchedulerException;


}
